<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>reduce()方法</title>
		<script>
			const str = 'jshdjsihh';
			     const obj = str.split('').reduce((pre,item) => {
			         pre[item] ? pre[item] ++ : pre[item] = 1
			         return pre
			     },{})
			 console.log(obj)
		</script>
	</head>
	<body>
	</body>
</html>
